/**
 */
package fUML.Semantics.Loci.LociL1;

import fUML.Semantics.Classes.Kernel.Reference;
import fUML.Semantics.Classes.Kernel.Value;

import fUML.Semantics.CommonBehaviors.BasicBehaviors.ParameterValue;

import fUML.Syntax.Classes.Kernel.ValueSpecification;

import fUML.Syntax.CommonBehaviors.BasicBehaviors.Behavior;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Executor</b></em>'.
 * <!-- end-user-doc -->
 *
 * <!-- begin-model-doc -->
 * An executor is used to execute behaviors and evaluation value
 *               specifications.
 * <!-- end-model-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link fUML.Semantics.Loci.LociL1.Executor#getLocus <em>Locus</em>}</li>
 * </ul>
 * </p>
 *
 * @see fUML.Semantics.Loci.LociL1.LociL1Package#getExecutor()
 * @model
 * @generated
 */
public interface Executor extends EObject {
	/**
	 * Returns the value of the '<em><b>Locus</b></em>' container reference.
	 * It is bidirectional and its opposite is '{@link fUML.Semantics.Loci.LociL1.Locus#getExecutor <em>Executor</em>}'.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * The locus at which this executor resides.
	 * <!-- end-model-doc -->
	 * @return the value of the '<em>Locus</em>' container reference.
	 * @see #setLocus(Locus)
	 * @see fUML.Semantics.Loci.LociL1.LociL1Package#getExecutor_Locus()
	 * @see fUML.Semantics.Loci.LociL1.Locus#getExecutor
	 * @model opposite="executor" transient="false" ordered="false"
	 * @generated
	 */
	Locus getLocus();

	/**
	 * Sets the value of the '{@link fUML.Semantics.Loci.LociL1.Executor#getLocus <em>Locus</em>}' container reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Locus</em>' container reference.
	 * @see #getLocus()
	 * @generated
	 */
	void setLocus(Locus value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Execute the given behavior with the given input values in the given
	 *                   context, producing the given output values. 
	 *  // There must be one input
	 *                   parameter value for each input (in or in-out) parameter of the behavior.
	 *                   // The returned values include one parameter value for each output (in-out, out or
	 *                   return) parameter of the behavior.
	 *  // The execution instance is destroyed
	 *                   at completion.
	 *  
	 *  Execution execution =
	 *                   this.locus.factory.createExecution(behavior, context);
	 *  
	 *  for (int
	 *                   i = 0; i < inputs.size(); i++) {
	 *                   execution.setParameterValue(inputs.getValue(i));
	 *  }
	 *  
	 *                   execution.execute();
	 *  ParameterValueList outputValues =
	 *                   execution.getOutputParameterValues();
	 *  execution.destroy();
	 *                   
	 *  return outputValues;
	 *  
	 * <!-- end-model-doc -->
	 * @model behaviorRequired="true" behaviorOrdered="false" contextOrdered="false" inputsMany="true"
	 * @generated
	 */
	EList<ParameterValue> execute(Behavior behavior, fUML.Semantics.Classes.Kernel.Object context, EList<ParameterValue> inputs);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Evaluate the given value specification, returning the specified
	 *                   value.
	 *  
	 *  // Debug.println("[evaluate] Start...");
	 *  return
	 *                   this.locus.factory.createEvaluation(specification).evaluate();
	 *  
	 * <!-- end-model-doc -->
	 * @model required="true" ordered="false" specificationRequired="true" specificationOrdered="false"
	 * @generated
	 */
	Value evaluate(ValueSpecification specification);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * <!-- begin-model-doc -->
	 * // Instantiate the given class and start any behavior of the resulting
	 *                   object.
	 *  // (The behavior of an object includes any classifier behaviors
	 *                   for an active object or the class of the object itself, if that is a
	 *                   behavior.)
	 *  
	 *  Debug.println("[start] Starting " + type.name +
	 *                   "...");
	 *  
	 *  Object_ object = this.locus.instantiate(type);
	 *                   
	 *  Debug.println("[start] Object = " + object);
	 *                   object.startBehavior(type, inputs);
	 *  
	 *  Reference reference = new
	 *                   Reference();
	 *  reference.referent = object;
	 *  
	 *  return
	 *                   reference;
	 *  
	 * <!-- end-model-doc -->
	 * @model required="true" ordered="false" typeRequired="true" typeOrdered="false" inputsMany="true" inputsOrdered="false"
	 * @generated
	 */
	Reference start(fUML.Syntax.Classes.Kernel.Class type, EList<ParameterValue> inputs);

} // Executor
